package com.elite.service;

import com.elite.dao.CommentMapper;
import com.elite.entity.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/2/13.
 */
@Service("CommentService")
public class CommentServiceImp implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public void addComment(Comment comment) {
        commentMapper.insert(comment);
    }

    @Override
    public List selectComment(Integer goodsId) {
        return commentMapper.selectComment(goodsId);
    }

    @Override
    public void deleteByPrimaryKey(Integer commentId) {
        commentMapper.deleteByPrimaryKey(commentId);
    }
}
